<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /*
            需求：想让一个函数在3秒以后执行
                delay：指定的毫秒值

            setTimeout：该定时器函数只能够执行一次。
         */
        setTimeout(function (arg1, arg2, arg3) {
            console.log("3秒后执行该函数");
            console.log(arg1);
            console.log(arg2);
            console.log(arg3);
        }, 3000, 1, 2, 3);

        function func1() {
            console.log("5秒后执行该函数");
        }
        const timeout1 = setTimeout(func1, 5000);
        console.log(timeout1);

    </script>
</body>

</html>